package com.arpa.ntocc.common.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 用户角色
 * </p>
 *
 * @author LEO
 * @since 2019-12-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_role")
@ApiModel(value="Role对象", description="用户角色")
public class Role extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "角色")
    @TableField("role")
    private String role;

    @ApiModelProperty(value = "角色名称")
    @TableField("role_name")
    @NotEmpty(message="角色名称不能为空")
    @Length(max = 100, message = "角色名称长度不能大于100个字符")
    private String roleName;

    @ApiModelProperty(value = "角色类型 0非内置,1内置角色")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "是否可以反审核：0否1是")
    @TableField("is_canalAudit")
    private Integer isCanalAudit;

    @ApiModelProperty(value = "说明")
    @TableField("description")
    @Length(max = 100, message = "说明长度不能大于100个字符")
    private String description;

    @ApiModelProperty(value = "机构code")
    private String branchCode;

}
